using System;
using System.Collections.Generic;
using System.Text;

namespace LogAnalyzerIIS.Helpers
{
	class ExcelHelper
	{
		public static string GetColumnPosition(string cellPosition)
		{
			string columnPosition = "";

			int i = 0;
			while (char.IsLetter(cellPosition[i]))
			{
				columnPosition += cellPosition[i];
				i++;
			}

			return columnPosition;
		}

		public static int GetRowNumber(string cellPosition)
		{
			int i = 0;
			while (char.IsLetter(cellPosition[i]))
				i++;

			return int.Parse(cellPosition.Substring(i));
		}
	}
}
